com.jproxy.proxy
Class DynamicProxyInvocationHandler
java.lang.Object
|
+--com.jproxy.proxy.DynamicProxyInvocationHandler
- All Implemented Interfaces:
- java.lang.reflect.InvocationHandler, java.io.Serializable, Tunnelizable
- public class DynamicProxyInvocationHandler
- extends java.lang.Object
- implements java.lang.reflect.InvocationHandler, java.io.Serializable, Tunnelizable
Implementation of InvocationHandler used by DynamicProxyStub.
The class implements handler for remote interface.
All methods of remote interface are delegated to the handler.
The class supports packaging requests with DataStack.
It also recognizes Callbacks and creates for them proxies stubs.
The class is used by client and created by Tunneling server.
- See Also:
Tunnel
,
Proxy
, Serialized Form
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicProxyInvocationHandler
public DynamicProxyInvocationHandler(TunnelInvocationHandler _handler)
throws TunnelException
- Constructor for DynamicProxyInvocationHandler
- Parameters:
interfaceName
- the name of remote interface for which methods are delegated to the handlerhandler
- TunnelInvocationHandler object
invoke
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
- The implementation of InvocationHandler
Processes a method invocation on a proxy instance and returns the result.
The method delegates call to TunnelInvocationHandler.
- Specified by:
invoke
in interface java.lang.reflect.InvocationHandler
- Parameters:
proxy
- the proxy instance that the method was invoked onmethod
- the Method instance corresponding to the interface method invoked on the proxyargs
- an array of objects containing the values of the arguments passed in the method
getTunnelInvocationHandler
public TunnelInvocationHandler getTunnelInvocationHandler()
- Specified by:
getTunnelInvocationHandler
in interface Tunnelizable
setTunnelInvocationHandler
public void setTunnelInvocationHandler(TunnelInvocationHandler _handler)
- Specified by:
setTunnelInvocationHandler
in interface Tunnelizable
Copyright ⌐ JProxy LLC. All Rights Reserved.